const Uglify = require('uglifyjs-webpack-plugin');
const webpack = require('webpack');


module.exports = require('webpack-merge')(
  require('./webpack.config'),
  {
    devtool: 'cheap-module-source-map',
    output: {
      filename: '[name].[chunkhash:5].js',
      chunkFilename: '[name]-[id].[chunkhash:5].js',
      publicPath: '//static.mycuo.cn/bundles/video-wiki/'
    },
    plugins: [
      new Uglify({
        sourceMap: true
      }),
      new webpack.DefinePlugin({
        'process.env.NODE_ENV': JSON.stringify('production')
      })
    ]
  }
)